AJAX เสถ ยร ห นตา ส าน กเทคโนโลย สารสนเทศและการส อสาร มหาว ทยาล ยนเรศวร พะเยา

Size: px
Start display at page:

Download "AJAX เสถ ยร ห นตา ส าน กเทคโนโลย สารสนเทศและการส อสาร มหาว ทยาล ยนเรศวร พะเยา"

Transcription

1 AJAX เสถ ยร ห นตา ส าน กเทคโนโลย สารสนเทศและการส อสาร มหาว ทยาล ยนเรศวร พะเยา 1

2 Ajax ( Asynchronous JavaScript and XML ) Ajax ค ออะไร JavaScript DHTML = Dynamic HTML XML = Extensive Markup Language Css = Cascading Style Sheets Dom = Document Object Model XMLHTTPRequest 2

3 โครงสร างของ Ajax จากรป Ajax engine น อยระ หยาง วser UnterIace กf server บซ ง จะองหยาปม ปมนการเ นการเ างานเ Client การเ างานทยาง ของ ต ต โปรๆกร จะไป ร ก Ajax engine ทfหน ขซน า ๆเ นเ การร องขอ น า หม จาก server โผ ทรง 3

4 ข อผ ของ Ajax update ๆ างสยหน ทใผทยอๆ Asynchronous ประ หช ชเ Server ชผชง รองรf ราห บอรแ ชfก ชfก JavaScript ไ ยท องทใผทfง ร อ ต Plugs in 4

5 ทfหอ ยาง หม ๆ Ajax mail mail indos Live s Live Hotmail 5

6 AJAX AJAX is not a new programming language, but a new technique for creating better, faster, and more interactive web applications. With AJAX, a JavaScript can communicate directly with the server, with the XMLHttpRequest object. With this object, a JavaScript can trade data with a web server, without reloading the page. AJAX uses asynchronous data transfer (HTTP requests) between the browser and the web server, allowing web pages to request small bits of information from the server instead of whole pages. The AJAX technique makes Internet applications smaller, faster and more user-friendly. 6

7 To get or send information from/to a database or a file on the server with traditional JavaScript, you will have to make an HTML form, and a user will have to click the "Submit" button to send/get the information, wait for the server to respond, then a new page will load with the results. Because the server returns a new page each time the user submits input, traditional web applications can run slowly and tend to be less user-friendly. With AJAX, your JavaScript communicates directly with the server, through the JavaScript XMLHttpRequest object. With the XMLHttpRequest object, a web page can make a request to, and get a response from a web server - without reloading the page. The user will stay on the same page, and he or she will not notice that scripts request pages, or send data to a server in the background. 7

8 XMLHttpRequest By using the XMLHttpRequest object, a web developer can update a page with data from the server after the page has loaded! AJAX was made popular in 2005 by Google (with Google Suggest). Google Suggest is using the XMLHttpRequest object to create a very dynamic web interface: When you start typing in Google's search box, a JavaScript sends the letters off to a server and the server returns a list of suggestions. The XMLHttpRequest object is supported in all major browsers (Internet Explorer, Firefox, Chrome, Opera, and Safari). 8

9 Browser and AJAX All new browsers support a new built-in JavaScript XMLHttpRequest object (IE5 and IE6 uses an ActiveXObject). This object can be used to request information (data) from a server. Let's update our HTML file with a JavaScript in the <head> section: 9

10 function loadxmldoc(url) if (window.xmlhttprequest) // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); else // code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); xmlhttp.open("get",url,false); xmlhttp.send(null); document.getelementbyid('test').innerhtml=xmlhtt p.responsetext; 10

11 Important Methods The XMLHttpRequest object has 2 important methods: The open() method The send() method 11

12 Sending an AJAX Request to a Server To send a request to a web server, we use the open() and send() methods. The open() method takes three arguments. The first argument defines which method to use (GET or POST). The second argument specifies the name of the server resource (URL). The third argument specifies if the request should be handled asynchronously. The send() method sends the request off to the server. If we assume that requested a file called "time.asp", the code would be: url="time.asp" xmlhttp.open("get",url,true); xmlhttp.send(null); In the example we assume that the current web page and the requested resource are both in the same file directory. 12

13 Important Properties The XMLHttpRequest object has 3 important properties: The responsetext property The readystate property The onreadystatechange property 13

14 The responsetext property The XMLHttpRequest object stores any data retrieved from a server as a result of a server request in its responsetext property. In the previous chapter we copied the content of the responstext property into our HTML with the following statement: document.getelementbyid('test').innerhtml=xmlh ttp.responsetext 14

15 XMLHttpRequest Open - Using False xmlhttp.open("get",url,false); xmlhttp.send(null); document.getelementbyid('test').innerhtml=xmlhttp.respo nsetext; The third parameter in the open call is "false". This tells the XMLHttpRequest object to wait until the server request is completed before next statement is executed. For small applications and simple server request, this might be OK. But if the request takes a long time or cannot be served, this might cause your web application to hang or stop. 15

16 XMLHttpRequest Open - Using True By changing the third parameter in the open call to "true", you tell the XMLHttpRequest object to continue the execution after the request to the server has been sent. Because you cannot simply start using the response from the server request before you are sure the request has been completed, you need to set the onreadystatechange property of the XMLHttpRequest, to a function (or name of a function) to be executed after completion. In this onreadystatechange function you must test the readystate property before you can use the result of the server call. Simply change the code to: xmlhttp.onreadystatechange=function() if(xmlhttp.readystate==4) document.getelementbyid('test').innerhtml=xmlhttp.response Text xmlhttp.open("get",url,true); xmlhttp.send(null); 16

17 The readystate property The readystate property holds the status of the server's response. Possible values for the readystate property: 17

18 The onreadystatechange property The onreadystatechange property stores a function (or the name of a function) to be called automatically each time the readystate property changes. You can store a full function in the property like this: xmlhttp.onreadystatechange=function() if(xmlhttp.readystate==4) document.getelementbyid('test').innerhtml=xmlhttp.res ponsetext xmlhttp.open("get",url,true); xmlhttp.send(null); 18

19 Or you can store the name of a function like this: xmlhttp.onreadystatechange=state_change xmlhttp.open("get",url,true); xmlhttp.send(null); function state_change() if(xmlhttp.readystate==4) document.getelementbyid('test').innerhtml=xmlhttp.res ponsetext 19

20 XMLHttpRequest Object can Request any Data With the XMLHttpRequest object, you can request any web resource from a server. You can request TXT files, HTML files, XML files, pictures or any data that is accessible from the Internet. 20

21 Example explained - The HTML form <form> First Name: <input type="text" id="txt1" onkeyup="showhint(this.value)" /> </form> <p>suggestions: <span id="txthint"></span></p> 21

22 var xmlhttp function showhint(str) if (str.length==0) document.getelementbyid("txthint").innerhtml=""; return; xmlhttp=getxmlhttpobject(); if (xmlhttp==null) alert ("Your browser does not support XMLHTTP!"); return; var url="gethint.php"; url=url+"?q="+str; url=url+"&sid="+math.random(); xmlhttp.onreadystatechange=statechanged; xmlhttp.open("get",url,true); xmlhttp.send(null); 22

23 The function above executes every time a character is entered in the input field. If there is input in the input field (str.length > 0), the showhint() function executes the following: Defines the URL (filename) to send to the server Adds a parameter (q) to the URL with the content of the input field Adds a random number to prevent the server from using a cached file Creates an XMLHTTP object, and tells the object to execute a function called statechanged when a change is triggered Opens the XMLHTTP object with the given URL Sends an HTTP request to the server 23

24 The GetXmlHttpObject() function function GetXmlHttpObject() if (window.xmlhttprequest) // code for IE7+, Firefox, Chrome, Opera, Safari return new XMLHttpRequest(); if (window.activexobject) // code for IE6, IE5 return new ActiveXObject("Microsoft.XMLHTTP"); return null; 24

25 The statechanged() function function statechanged() if (xmlhttp.readystate==4) document.getelementbyid("txthint").innerh TML=xmlhttp.responseText; 25

26 The AJAX JavaScript function statechanged() if (xmlhttp.readystate==4) document.getelementbyid("txthint").innerhtml=xmlhttp.responsetext; function GetXmlHttpObject() if (window.xmlhttprequest) // code for IE7+, Firefox, Chrome, Opera, Safari return new XMLHttpRequest(); if (window.activexobject) // code for IE6, IE5 return new ActiveXObject("Microsoft.XMLHTTP"); return null; 26

27 PHP <?php // Fill up array with names $a[]="anna"; $a[]="brittany"; $a[]="cinderella"; $a[]="diana"; $a[]="eva"; $a[]="fiona"; $a[]="gunda"; 27

28 //get the q parameter from URL $q=$_get["q"]; //lookup all hints from array if length of q>0 if (strlen($q) > 0) $hint=""; for($i=0; $i<count($a); $i++) if (strtolower($q)==strtolower(substr($a[$i],0,strlen($q)))) if ($hint=="") $hint=$a[$i]; else $hint=$hint.", ".$a[$i]; 28

29 // Set output to "no suggestion" if no hint were found // or to the correct values if ($hint == "") $response="no suggestion"; else $response=$hint; //output the response echo $response;?> 29

30 Step of AJAX สร างอ อบเจ ก XMLHttpRequest ตรวจสอบสถานะจาก property onreadystatechange หากคาจาก property readystate เทากบ 4 กให น าผลล พธ ท ตอบ กล บมา(property responsetext ) ไใป ช เลย สง request ไย ง Server 30

31 AJAX and Database 31

32 HTML Code <html> <head> <script type="text/javascript" src="selectcustomer.js"></script> </head> <body> <form> Select a Customer: <select name="customers" onchange="showcustomer(this.value)"> <option value="alfki">alfreds Futterkiste</option> <option value="norts ">North/South</option> <option value="wolza">wolski Zajazd</option> </select> </form> <div id="txthint"><b>customer info will be listed here.</b></div> </body> </html 32

33 JavaScript selectcustomer.js var xmlhttp function showcustomer(str) xmlhttp=getxmlhttpobject(); if (xmlhttp==null) alert ("Your browser does not support AJAX!"); return; var url="getcustomer.asp"; url=url+"?q="+str; url=url+"&sid="+math.random(); xmlhttp.onreadystatechange=statechanged; xmlhttp.open("get",url,true); xmlhttp.send(null); 33

34 function statechanged() if (xmlhttp.readystate==4) document.getelementbyid("txthint").innerhtml=xmlhttp.responsetex t; function GetXmlHttpObject() if (window.xmlhttprequest) // code for IE7+, Firefox, Chrome, Opera, Safari return new XMLHttpRequest(); if (window.activexobject) // code for IE6, IE5 return new ActiveXObject("Microsoft.XMLHTTP"); return null; 34

35 Server Page getcustomer.asp <% response.expires=-1 sql="select * FROM CUSTOMERS WHERE CUSTOMERID=" sql=sql & "'" & request.querystring("q") & "'" set conn=server.createobject("adodb.connection") conn.provider="microsoft.jet.oledb.4.0" conn.open(server.mappath("/db/northwind.mdb")) set rs=server.createobject("adodb.recordset") rs.open sql,conn response.write("<table>") do until rs.eof for each x in rs.fields response.write("<tr><td><b>" & x.name & "</b></td>") response.write("<td>" & x.value & "</td></tr>") next rs.movenext loop response.write("</table>") %> 35

36 อ างอ ง บ ดปา ไะส ละเตส ง. พ ญนาเวบช วยเทคน ค Ajax และ PHP. กรฒงเทพ : บร ฯ ท ว.พร นท ษ (1991) จ ากช,

AJAX(Asynchronous Javascript + XML) Creating client-side dynamic Web pages

AJAX(Asynchronous Javascript + XML) Creating client-side dynamic Web pages AJAX(Asynchronous Javascript + XML) Creating client-side dynamic Web pages AJAX = Asynchronous JavaScript and XML.AJAX is not a new programming language, but a new way to use existing standards. AJAX is

More information

JavaScript + PHP AJAX. Costantino Pistagna

JavaScript + PHP AJAX. Costantino Pistagna JavaScript + PHP AJAX Costantino Pistagna What s is Ajax? AJAX is not a new programming language It s a new technique for better and faster web applications. JavaScript can communicate

More information

A.A. 2008/09. What is Ajax?

A.A. 2008/09. What is Ajax? Internet t Software Technologies AJAX IMCNE A.A. 2008/09 Gabriele Cecchetti What is Ajax? AJAX stands for Asynchronous JavaScript And XML. AJAX is a type of programming made popular in 2005 by Google (with

More information

CITS1231 Web Technologies. Ajax and Web 2.0 Turning clunky website into interactive mashups

CITS1231 Web Technologies. Ajax and Web 2.0 Turning clunky website into interactive mashups CITS1231 Web Technologies Ajax and Web 2.0 Turning clunky website into interactive mashups What is Ajax? Shorthand for Asynchronous JavaScript and XML. Coined by Jesse James Garrett of Adaptive Path. Helps

More information

AJAX. Introduction. AJAX: Asynchronous JavaScript and XML

AJAX. Introduction. AJAX: Asynchronous JavaScript and XML AJAX 1 2 Introduction AJAX: Asynchronous JavaScript and XML Popular in 2005 by Google Create interactive web applications Exchange small amounts of data with the server behind the scenes No need to reload

More information

Web Programming/Scripting: PHP and AJAX Refresher

Web Programming/Scripting: PHP and AJAX Refresher CS 312 Internet Concepts Web Programming/Scripting: PHP and AJAX Refresher Dr. Michele Weigle Department of Computer Science Old Dominion University mweigle@cs.odu.edu http://www.cs.odu.edu/~mweigle/cs312-f11

More information

Web Application Security

Web Application Security Web Application Security Rajendra Kachhwaha rajendra1983@gmail.com September 23, 2015 Lecture 13: 1/ 18 Outline Introduction to AJAX: 1 What is AJAX 2 Why & When use AJAX 3 What is an AJAX Web Application

More information

XMLHttpRequest. CS144: Web Applications

XMLHttpRequest. CS144: Web Applications XMLHttpRequest http://oak.cs.ucla.edu/cs144/examples/google-suggest.html Q: What is going on behind the scene? What events does it monitor? What does it do when

More information

Ajax Ajax Ajax = Asynchronous JavaScript and XML Using a set of methods built in to JavaScript to transfer data between the browser and a server in the background Reduces the amount of data that must be

More information

AJAX. Ajax: Asynchronous JavaScript and XML *

AJAX. Ajax: Asynchronous JavaScript and XML * AJAX Ajax: Asynchronous JavaScript and XML * AJAX is a developer's dream, because you can: Read data from a web server - after the page has loaded Update a web page without reloading the page Send data

More information

1 AJAX - Asynchronous JavaScript and XML. ღონღაძე გიორგი თარგმანი ვებ გვერდიდან ვიკიწიგნების ბიბლიოთეკიდან

1 AJAX - Asynchronous JavaScript and XML. ღონღაძე გიორგი თარგმანი ვებ გვერდიდან  ვიკიწიგნების ბიბლიოთეკიდან 1 AJAX - Asynchronous JavaScript and XML ღონღაძე გიორგი თარგმანი ვებ გვერდიდან www.w3schools.com ვიკიწიგნების ბიბლიოთეკიდან 2 AJAX - Asynchronous JavaScript and XML შესავალი რა უნდა იცოდეთ? სანამ ამ ენის

More information

AJAX and PHP AJAX. Christian Wenz,

AJAX and PHP AJAX. Christian Wenz, AJAX and PHP Christian Wenz, AJAX A Dutch soccer team A cleaner Two characters from Iliad A city in Canada A mountain in Colorado... Asynchronous JavaScript + XML 1 1 What is AJAX?

More information

Introduction to InfoSec SQLI & XSS (R10+11) Nir Krakowski (nirkrako at post.tau.ac.il) Itamar Gilad (itamargi at post.tau.ac.il)

Introduction to InfoSec SQLI & XSS (R10+11) Nir Krakowski (nirkrako at post.tau.ac.il) Itamar Gilad (itamargi at post.tau.ac.il) Introduction to InfoSec SQLI & XSS (R10+11) Nir Krakowski (nirkrako at post.tau.ac.il) Itamar Gilad (itamargi at post.tau.ac.il) Covered material Useful SQL Tools SQL Injection in a Nutshell. Mass Code

More information

Ajax Ajax Ajax = Asynchronous JavaScript and XML Using a set of methods built in to JavaScript to transfer data between the browser and a server in the background Reduces the amount of data that must be

More information

An Introduction to AJAX. By : I. Moamin Abughazaleh

An Introduction to AJAX. By : I. Moamin Abughazaleh An Introduction to AJAX By : I. Moamin Abughazaleh How HTTP works? Page 2 / 25 Classical HTTP Process Page 3 / 25 1. The visitor requests a page 2. The server send the entire HTML, CSS and Javascript code

More information

AJAX: Introduction CISC 282 November 27, 2018

AJAX: Introduction CISC 282 November 27, 2018 AJAX: Introduction CISC 282 November 27, 2018 Synchronous Communication User and server take turns waiting User requests pages while browsing Waits for server to respond Waits for the page to load in the

More information

Module7: AJAX. Click, wait, and refresh user interaction. Synchronous request/response communication model. Page-driven: Workflow is based on pages

Module7: AJAX. Click, wait, and refresh user interaction. Synchronous request/response communication model. Page-driven: Workflow is based on pages INTERNET & WEB APPLICATION DEVELOPMENT SWE 444 Fall Semester 2008-2009 (081) Module7: Objectives/Outline Objectives Outline Understand the role of Learn how to use in your web applications Rich User Experience

More information

Fall Semester (081) Module7: AJAX

Fall Semester (081) Module7: AJAX INTERNET & WEB APPLICATION DEVELOPMENT SWE 444 Fall Semester 2008-2009 (081) Module7: AJAX Dr. El-Sayed El-Alfy Computer Science Department King Fahd University of Petroleum and Minerals alfy@kfupm.edu.sa

More information

AJAX. Lecture 26. Robb T. Koether. Fri, Mar 21, Hampden-Sydney College. Robb T. Koether (Hampden-Sydney College) AJAX Fri, Mar 21, / 16

AJAX. Lecture 26. Robb T. Koether. Fri, Mar 21, Hampden-Sydney College. Robb T. Koether (Hampden-Sydney College) AJAX Fri, Mar 21, / 16 AJAX Lecture 26 Robb T. Koether Hampden-Sydney College Fri, Mar 21, 2014 Robb T. Koether (Hampden-Sydney College) AJAX Fri, Mar 21, 2014 1 / 16 1 AJAX 2 Http Requests 3 Request States 4 Handling the Response

More information

Ajax- XMLHttpResponse. Returns a value such as ArrayBuffer, Blob, Document, JavaScript object, or a DOMString, based on the value of

Ajax- XMLHttpResponse. Returns a value such as ArrayBuffer, Blob, Document, JavaScript object, or a DOMString, based on the value of Ajax- XMLHttpResponse XMLHttpResponse - A Read only field Returns a value such as ArrayBuffer, Blob, Document, JavaScript object, or a DOMString, based on the value of XMLHttpRequest.responseType. This

More information

ISI Web of Science. SciFinder Scholar. PubMed ส บค นจากฐานข อม ล

ISI Web of Science. SciFinder Scholar. PubMed ส บค นจากฐานข อม ล 2.3.3 Search Chem. Info. in Journal ส บค นจากฐานข อม ล - ฐานข อม ลท รวบรวมข อม ลของ journal จากหลาย ๆ แหล ง ISI http://portal.isiknowledge.com/portal.cgi/ SciFinder ต องต ดต งโปรแกรมพ เศษ และสม ครสมาช

More information

AJAX là viết tắt của Asynchronous JavaScript And XML. AJAX là một kiểu lập trình trở nên phổ biến vào năm 2005 (với Google Suggest).

AJAX là viết tắt của Asynchronous JavaScript And XML. AJAX là một kiểu lập trình trở nên phổ biến vào năm 2005 (với Google Suggest). AJAX là viết tắt của Asynchronous JavaScript And XML. AJAX là một kiểu lập trình trở nên phổ biến vào năm 2005 (với Google Suggest). AJAX không phải là một ngôn ngữ lập trình mới mà là một cách thức mới

More information

AJAX: The Basics CISC 282 March 25, 2014

AJAX: The Basics CISC 282 March 25, 2014 AJAX: The Basics CISC 282 March 25, 2014 Synchronous Communication User and server take turns waiting User requests pages while browsing Waits for server to respond Waits for the page to load in the browser

More information

Use of PHP for DB Connection. Middle and Information Tier

Use of PHP for DB Connection. Middle and Information Tier Client: UI HTML, JavaScript, CSS, XML Use of PHP for DB Connection Middle Get all books with keyword web programming PHP Format the output, i.e., data returned from the DB SQL DB Query Access/MySQL 1 2

More information

AJAX: The Basics CISC 282 November 22, 2017

AJAX: The Basics CISC 282 November 22, 2017 AJAX: The Basics CISC 282 November 22, 2017 Synchronous Communication User and server take turns waiting User requests pages while browsing Waits for server to respond Waits for the page to load in the

More information

Use of PHP for DB Connection. Middle and Information Tier. Middle and Information Tier

Use of PHP for DB Connection. Middle and Information Tier. Middle and Information Tier Use of PHP for DB Connection 1 2 Middle and Information Tier PHP: built in library functions for interfacing with the mysql database management system $id = mysqli_connect(string hostname, string username,

More information

Ajax. Ronald J. Glotzbach

Ajax. Ronald J. Glotzbach Ajax Ronald J. Glotzbach What is AJAX? Asynchronous JavaScript and XML Ajax is not a technology Ajax mixes well known programming techniques in an uncommon way Enables web builders to create more appealing

More information

A synchronous J avascript A nd X ml

A synchronous J avascript A nd X ml A synchronous J avascript A nd X ml The problem AJAX solves: How to put data from the server onto a web page, without loading a new page or reloading the existing page. Ajax is the concept of combining

More information

Contents. Demos folder: Demos\14-Ajax. 1. Overview of Ajax. 2. Using Ajax directly. 3. jquery and Ajax. 4. Consuming RESTful services

Contents. Demos folder: Demos\14-Ajax. 1. Overview of Ajax. 2. Using Ajax directly. 3. jquery and Ajax. 4. Consuming RESTful services Ajax Contents 1. Overview of Ajax 2. Using Ajax directly 3. jquery and Ajax 4. Consuming RESTful services Demos folder: Demos\14-Ajax 2 1. Overview of Ajax What is Ajax? Traditional Web applications Ajax

More information

Broken Characters Identification for Thai Character Recognition Systems

Broken Characters Identification for Thai Character Recognition Systems Broken Characters Identification for Thai Character Recognition Systems NUCHAREE PREMCHAISWADI*, WICHIAN PREMCHAISWADI* UBOLRAT PACHIYANUKUL**, SEINOSUKE NARITA*** *Faculty of Information Technology, Dhurakijpundit

More information

Part of this connection identifies how the response can / should be provided to the client code via the use of a callback routine.

Part of this connection identifies how the response can / should be provided to the client code via the use of a callback routine. What is AJAX? In one sense, AJAX is simply an acronym for Asynchronous JavaScript And XML In another, it is a protocol for sending requests from a client (web page) to a server, and how the information

More information

Building Dynamic Forms with XML, XSLT

Building Dynamic Forms with XML, XSLT International Journal of Computing and Optimization Vol. 2, 2015, no. 1, 23-34 HIKARI Ltd, www.m-hikari.com http://dx.doi.org/10.12988/ijco.2015.517 Building Dynamic Forms with XML, XSLT Dhori Terpo University

More information

Session 11. Ajax. Reading & Reference

Session 11. Ajax. Reading & Reference Session 11 Ajax Reference XMLHttpRequest object Reading & Reference en.wikipedia.org/wiki/xmlhttprequest Specification developer.mozilla.org/en-us/docs/web/api/xmlhttprequest JavaScript (6th Edition) by

More information

<?xml version = 1.0 encoding= windows-874?> <?xml-stylesheet type= text/css href= #xmldocs?> <style id= xmldocs > element-name{ } </style>

<?xml version = 1.0 encoding= windows-874?> <?xml-stylesheet type= text/css href= #xmldocs?> <style id= xmldocs > element-name{ } </style> XML Displaying Displaying XML: CSS A modern web browser and a cascading style sheet (CSS) may be used to view XML as if it were HTML A style must be defined for every XML tag, or the browser displays it

More information

AJAX Programming Chris Seddon

AJAX Programming Chris Seddon AJAX Programming Chris Seddon seddon-software@keme.co.uk 2000-12 CRS Enterprises Ltd 1 2000-12 CRS Enterprises Ltd 2 What is Ajax? "Asynchronous JavaScript and XML" Originally described in 2005 by Jesse

More information

Session 11. Calling Servlets from Ajax. Lecture Objectives. Understand servlet response formats

Session 11. Calling Servlets from Ajax. Lecture Objectives. Understand servlet response formats Session 11 Calling Servlets from Ajax 1 Lecture Objectives Understand servlet response formats Text Xml Html JSON Understand how to extract data from the XMLHttpRequest object Understand the cross domain

More information

HTML5 Features Integration in Green Ajax to Implement More Efficient Push Technology

HTML5 Features Integration in Green Ajax to Implement More Efficient Push Technology Implement More Efficient Push Technology Ridwan Sanjaya Department of Information Systems Faculty of Computer Science Soegijapranata Catholic University Semarang, Indonesia ridwan@unika.ac.id Abstract

More information

AJAX ASYNCHRONOUS JAVASCRIPT AND XML. Laura Farinetti - DAUIN

AJAX ASYNCHRONOUS JAVASCRIPT AND XML. Laura Farinetti - DAUIN AJAX ASYNCHRONOUS JAVASCRIPT AND XML Laura Farinetti - DAUIN Rich-client asynchronous transactions In 2005, Jesse James Garrett wrote an online article titled Ajax: A New Approach to Web Applications (www.adaptivepath.com/ideas/essays/archives/000

More information

E ECMAScript, 21 elements collection, HTML, 30 31, 31. Index 161

E ECMAScript, 21 elements collection, HTML, 30 31, 31. Index 161 A element, 108 accessing objects within HTML, using JavaScript, 27 28, 28 activatediv()/deactivatediv(), 114 115, 115 ActiveXObject, AJAX and, 132, 140 adding information to page dynamically, 30, 30,

More information

Advanced Web Programming with JavaScript and Google Maps. Voronezh State University Voronezh (Russia) AJAX. Sergio Luján Mora

Advanced Web Programming with JavaScript and Google Maps. Voronezh State University Voronezh (Russia) AJAX. Sergio Luján Mora with JavaScript and Google Maps Voronezh State University Voronezh (Russia) AJAX Sergio Luján Mora Departamento de Lenguajes y Sistemas Informáticos DLSI - Universidad de Alicante 1 Table of contents Two

More information

JavaScript Framework: AngularJS

JavaScript Framework: AngularJS บทท 8 JavaScript Framework: AngularJS ว ชา เทคโนโลย เว บ (รห สว ชา 04-06-204) ว ตถ ประสงค การเร ยนร เพ อให ผ เร ยนม ความร ความเข าใจเก ยวก บ JavaScript Framework: AngularJS เพ อให ผ เร ยนสามารถนาเสนอการดาเน

More information

wemx WebService V1.0

wemx WebService V1.0 wemx WebService 2 wemx WebService WEMX WEBSERVICE... 1 1. WEB SERVICE INTRODUCTION... 6 1.1. SYSTEM PAGE... 6 1.2. USER PAGE... 7 1.3. WEB SERVICE API... 8 2. SYSTEM PAGE PROVIDED BY THE WEB SERVICE...

More information

1 Explain the following in brief, with respect to usage of Ajax

1 Explain the following in brief, with respect to usage of Ajax PES Institute of Technology, Bangalore South Campus (Formerly PES School of Engineering) (Hosur Road, 1KM before Electronic City, Bangalore-560 100) INTERNAL TEST (SCHEME AND SOLUTION) 1 Subject Name:

More information

Introduction to Ajax

Introduction to Ajax Introduction to Ajax with Bob Cozzi What is AJAX? Asynchronous JavaScript and XML A J a X Asynchronous data retrieval using the XMLHttpRequest object from JavaScript Data is retrieved from the server as

More information

Module 5 JavaScript, AJAX, and jquery. Module 5. Module 5 Contains 2 components

Module 5 JavaScript, AJAX, and jquery. Module 5. Module 5 Contains 2 components Module 5 JavaScript, AJAX, and jquery Module 5 Contains 2 components Both the Individual and Group portion are due on Monday October 30 th Start early on this module One of the most time consuming modules

More information

The Clustering Technique for Thai Handwritten Recognition

The Clustering Technique for Thai Handwritten Recognition The Clustering Technique for Thai Handwritten Recognition Ithipan Methasate, Sutat Sae-tang Information Research and Development Division National Electronics and Computer Technology Center National Science

More information

Asynchronous JavaScript + XML (Ajax)

Asynchronous JavaScript + XML (Ajax) Asynchronous JavaScript + XML (Ajax) CSE 190 M (Web Programming), Spring 2008 University of Washington References: w3schools, Wikipedia Except where otherwise noted, the contents of this presentation are

More information

2/6/2012. Rich Internet Applications. What is Ajax? Defining AJAX. Asynchronous JavaScript and XML Term coined in 2005 by Jesse James Garrett

2/6/2012. Rich Internet Applications. What is Ajax? Defining AJAX. Asynchronous JavaScript and XML Term coined in 2005 by Jesse James Garrett What is Ajax? Asynchronous JavaScript and XML Term coined in 2005 by Jesse James Garrett http://www.adaptivepath.com/ideas/essays/archives /000385.php Ajax isn t really new, and isn t a single technology

More information

Term Paper. P r o f. D r. E d u a r d H e i n d l. H o c h s c h u l e F u r t w a n g e n U n i v e r s i t y. P r e s e n t e d T o :

Term Paper. P r o f. D r. E d u a r d H e i n d l. H o c h s c h u l e F u r t w a n g e n U n i v e r s i t y. P r e s e n t e d T o : Version: 0.1 Date: 02.05.2009 Author(s): Doddy Satyasree AJAX Person responsable: Doddy Satyasree Language: English Term Paper History Version Status Date 0.1 Draft Version created 02.05.2009 0.2 Final

More information

Introduction to AJAX Bringing Interactivity & Intuitiveness Into Web Applications. By : Bhanwar Gupta SD-Team-Member Jsoft Solutions

Introduction to AJAX Bringing Interactivity & Intuitiveness Into Web Applications. By : Bhanwar Gupta SD-Team-Member Jsoft Solutions Introduction to AJAX Bringing Interactivity & Intuitiveness Into Web Applications By : Bhanwar Gupta SD-Team-Member Jsoft Solutions Applications today You have two basic choices: Desktop applications and

More information

Looking forward to a successful coopertation : TEIN

Looking forward to a successful coopertation : TEIN Space Krenovation Park : SKP Looking forward to a successful coopertation : TEIN Geo-Informatics and Space Technology Development Agency : GISTDA Space Krenovation Park @ Chonburi 1 Mission TC/TM House

More information

Abstract. 1. Introduction. 2. AJAX overview

Abstract. 1. Introduction. 2. AJAX overview Asynchronous JavaScript Technology and XML (AJAX) Chrisina Draganova Department of Computing, Communication Technology and Mathematics London Metropolitan University 100 Minories, London EC3 1JY c.draganova@londonmet.ac.uk

More information

WebApp development. Outline. Web app structure. HTML basics. 1. Fundamentals of a web app / website. Tiberiu Vilcu

WebApp development. Outline. Web app structure. HTML basics. 1. Fundamentals of a web app / website. Tiberiu Vilcu Outline WebApp development Tiberiu Vilcu Prepared for EECS 411 Sugih Jamin 20 September 2017 1 2 Web app structure HTML basics Back-end: Web server Database / data storage Front-end: HTML page CSS JavaScript

More information

INPUT Input point Measuring cycle Input type Disconnection detection Input filter

INPUT Input point Measuring cycle Input type Disconnection detection Input filter 2 = TEMPERATURE CONTROLLER PAPERLESS RECORDER หน าจอเป น Touch Sceen 7-Inch LCD เก บข อม ลผ าน SD Card และ USB Memory ร บ Input เป น TC/RTD/DC Voltage/DC Current ร บ Input 6 Channel ช วงเวลาในการอ านส

More information

Ajax UNIX MAGAZINE if0505.pdf. (86) Ajax. Ajax. Ajax (Asynchronous JavaScript + XML) Jesse James Garrett Web 1. Web.

Ajax UNIX MAGAZINE if0505.pdf. (86) Ajax. Ajax. Ajax (Asynchronous JavaScript + XML) Jesse James Garrett Web 1. Web. (86) Ajax 2003 2 Flash ` CGI Web Web Flash Java Flash Java JavaScript Google Google Suggest GMail Google Maps JavaScript Yahoo! Google Maps JavaScript `Ajax Ajax Web Ajax Ajax (Asynchronous JavaScript

More information

,

, Weekdays:- 1½ hrs / 3 days Fastrack:- 1½hrs / Day [Class Room and Online] ISO 9001:2015 CERTIFIED ADMEC Multimedia Institute www.admecindia.co.in 9911782350, 9811818122 Welcome to one of the highly professional

More information

ว ธ การต ดต ง Symantec Endpoint Protection

ว ธ การต ดต ง Symantec Endpoint Protection ว ธ การต ดต ง Symantec Endpoint Protection 1. Download File ส าหร บการต ดต ง 2. Install Symantec Endpoint Protection Manager 3. Install License 4. Install Symantec Endpoint Protection Client to Server

More information

การสร างเว บเซอร ว สโดยใช Microsoft.NET

การสร างเว บเซอร ว สโดยใช Microsoft.NET การสร างเว บเซอร ว สโดยใช Microsoft.NET อ.ดร. กานดา ร ณนะพงศา ภาคว ชาว ศวกรรมคอมพ วเตอร คณะว ศวกรรมคอมพ วเตอร มหาว ทยาล ยขอนแก น บทน า.NET เป นเคร องม อท เราสามารถน ามาใช ในการสร างและเร ยกเว บเซอร ว สได

More information

quiz 1 details wed nov 17, 1pm see handout for locations covers weeks 0 through 10, emphasis on 7 onward closed book bring a , 2-sided cheat she

quiz 1 details wed nov 17, 1pm see handout for locations covers weeks 0 through 10, emphasis on 7 onward closed book bring a , 2-sided cheat she quiz 1 details wed nov 17, 1pm see handout for locations covers weeks 0 through 10, emphasis on 7 onward closed book bring a 8.5 11, 2-sided cheat sheet 75 minutes 15% of final grade resources old quizzes

More information

Introduction to Ajax. Sang Shin Java Technology Architect Sun Microsystems, Inc.

Introduction to Ajax. Sang Shin Java Technology Architect Sun Microsystems, Inc. Introduction to Ajax Sang Shin Java Technology Architect Sun Microsystems, Inc. sang.shin@sun.com www.javapassion.com Agenda 1.What is Rich User Experience? 2.Rich Internet Application (RIA) Technologies

More information

Lesson 12: JavaScript and AJAX

Lesson 12: JavaScript and AJAX Lesson 12: JavaScript and AJAX Objectives Define fundamental AJAX elements and procedures Diagram common interactions among JavaScript, XML and XHTML Identify key XML structures and restrictions in relation

More information

Module 5 JavaScript, AJAX, and jquery. Module 5. Module 5 Contains an Individual and Group component

Module 5 JavaScript, AJAX, and jquery. Module 5. Module 5 Contains an Individual and Group component Module 5 JavaScript, AJAX, and jquery Module 5 Contains an Individual and Group component Both are due on Wednesday October 24 th Start early on this module One of the most time consuming modules in the

More information

Revision for Grade 7 ASP in Unit :1&2 Design & Technology Subject

Revision for Grade 7 ASP in Unit :1&2 Design & Technology Subject Your Name:.... Grade 7 - SECTION 1 Matching :Match the terms with its explanations. Write the matching letter in the correct box. The first one has been done for you. (1 mark each) Term Explanation 1.

More information

Developing Future Web Application with AJAX and ASP.NET Project "Atlas"

Developing Future Web Application with AJAX and ASP.NET Project Atlas Developing Future Web Application with AJAX and ASP.NET Project "Atlas" Smith Suksmith Microsoft MVP Solution Architect Web Application Rich UI can t delivered by Browser Technology How about Google Earth

More information

The course also includes an overview of some of the most popular frameworks that you will most likely encounter in your real work environments.

The course also includes an overview of some of the most popular frameworks that you will most likely encounter in your real work environments. Web Development WEB101: Web Development Fundamentals using HTML, CSS and JavaScript $2,495.00 5 Days Replay Class Recordings included with this course Upcoming Dates Course Description This 5-day instructor-led

More information

powered by Series of Tubes Senator Ted Stevens talking about the Net Neutrality Bill Jul 17, powered by

powered by Series of Tubes Senator Ted Stevens talking about the Net Neutrality Bill Jul 17, powered by Page 1 Lecture Notes 1: The Internet and World Wide Web CSE 190 M (Web Programming), Spring 2007 University of Washington Reading: Sebesta Ch. 1 sections 1.1-1.5.2, 1.7-1.8.5, 1.8.8, 1.9 What is the Internet?

More information

Chapter 8: Memory- Management Strategies Dr. Varin Chouvatut

Chapter 8: Memory- Management Strategies Dr. Varin Chouvatut Part I: Overview Part II: Process Management Part III : Storage Management Chapter 8: Memory- Management Strategies Dr. Varin Chouvatut, Silberschatz, Galvin and Gagne 2010 Chapter 8: Memory Management

More information

Graphics Design and Applied Arts บทท 6 การออกแบบเว บเบ องต น

Graphics Design and Applied Arts บทท 6 การออกแบบเว บเบ องต น 344-282 Graphics Design and Applied Arts บทท 6 การออกแบบเว บเบ องต น Review of Web Technology Millions of web surfers who could potentially view our site have a wide variety of computer systems, then Colors

More information

Programming for Digital Media. Lecture 7 JavaScript By: A. Mousavi and P. Broomhead SERG, School of Engineering Design, Brunel University, UK

Programming for Digital Media. Lecture 7 JavaScript By: A. Mousavi and P. Broomhead SERG, School of Engineering Design, Brunel University, UK Programming for Digital Media Lecture 7 JavaScript By: A. Mousavi and P. Broomhead SERG, School of Engineering Design, Brunel University, UK 1 Topics Ajax (Asynchronous JavaScript and XML) What it is and

More information

10.1 Overview of Ajax

10.1 Overview of Ajax 10.1 Overview of Ajax - History - Possibility began with the nonstandard iframe element, which appeared in IE4 and Netscape 4 - An iframe element could be made invisible and could be used to send asynchronous

More information

AJAX Basics. Welcome to AJAX Basics presentation. My name is Sang Shin. I am Java technology architect and evangelist from Sun Microsystems.

AJAX Basics. Welcome to AJAX Basics presentation. My name is Sang Shin. I am Java technology architect and evangelist from Sun Microsystems. AJAX Basics Sang Shin Java Technology Architect Sun Microsystems, Inc. sang.shin@sun.com www.javapassion.com Welcome to AJAX Basics presentation. My name is Sang Shin. I am Java technology architect and

More information

Credits: Some of the slides are based on material adapted from

Credits: Some of the slides are based on material adapted from 1 The Web, revisited WEB 2.0 marco.ronchetti@unitn.it Credits: Some of the slides are based on material adapted from www.telerik.com/documents/telerik_and_ajax.pdf 2 The old web: 1994 HTML pages (hyperlinks)

More information

Networking & The Web. HCID 520 User Interface Software & Technology

Networking & The Web. HCID 520 User Interface Software & Technology Networking & The Web HCID 520 User Interface Software & Technology Uniform Resource Locator (URL) http://info.cern.ch:80/ 1991 HTTP v0.9 Uniform Resource Locator (URL) http://info.cern.ch:80/ Scheme/Protocol

More information

INDEX SYMBOLS See also

INDEX SYMBOLS See also INDEX SYMBOLS @ characters, PHP methods, 125 $ SERVER global array variable, 187 $() function, 176 $F() function, 176-177 elements, Rico, 184, 187 elements, 102 containers,

More information

It is highly recommended that you are familiar with HTML and JavaScript before attempting this tutorial.

It is highly recommended that you are familiar with HTML and JavaScript before attempting this tutorial. AJAX About the Tutorial AJAX is a web development technique for creating interactive web applications. If you know JavaScript, HTML, CSS, and XML, then you need to spend just one hour to start with AJAX.

More information

AJAX: Rich Internet Applications

AJAX: Rich Internet Applications AJAX: Rich Internet Applications Web Programming Uta Priss ZELL, Ostfalia University 2013 Web Programming AJAX Slide 1/27 Outline Rich Internet Applications AJAX AJAX example Conclusion More AJAX Search

More information

Ajax Simplified Nicholas Petreley Abstract Ajax can become complex as far as implementation, but the concept is quite simple. This is a simple tutorial on Ajax that I hope will ease the fears of those

More information

Best Practices for Embedded User Assistance

Best Practices for Embedded User Assistance Best Practices for Embedded User Assistance Scott DeLoach scott@clickstart.net Founder, ClickStart Certified Instructor, Flare RoboHelp Captivate UX and UA consultant and trainer Overview HIDE in plain

More information

Internet programming Lab. Lecturer Mariam A. Salih

Internet programming Lab. Lecturer Mariam A. Salih Internet programming Lab. Lecturer Mariam A. Salih The Internet : The Internet is a worldwide network of computer systems through which information can be easily shared. Browsers : To view information

More information

Key features. Nothing to do with java It is the Client-side scripting language Designed to add interactivity to HTML pages

Key features. Nothing to do with java It is the Client-side scripting language Designed to add interactivity to HTML pages Javascript Key features Nothing to do with java It is the Client-side scripting language Designed to add interactivity to HTML pages (DHTML): Event-driven programming model AJAX Great example: Google Maps

More information

Table of Contents. 1. A Quick Overview of Web Development...1 EVALUATION COPY

Table of Contents. 1. A Quick Overview of Web Development...1 EVALUATION COPY Table of Contents Table of Contents 1. A Quick Overview of Web Development...1 Client-side Programming...1 HTML...1 Cascading Style Sheets...1 JavaScript...1 Dynamic HTML...1 Ajax...1 Adobe Flash...2 Server-side

More information

C Programming

C Programming 204216 -- C Programming Chapter 5 Repetition Adapted/Assembled for 204216 by Areerat Trongratsameethong Objectives Basic Loop Structures The while Statement Computing Sums and Averages Using a while Loop

More information

CSE 130 Programming Language Principles & Paradigms Lecture # 20. Chapter 13 Concurrency. + AJAX Discussion

CSE 130 Programming Language Principles & Paradigms Lecture # 20. Chapter 13 Concurrency. + AJAX Discussion Chapter 13 Concurrency + AJAX Discussion Introduction Concurrency can occur at four levels: Machine instruction level (Processor) High-level language statement level Unit level Program level (OS) Because

More information

Session 18. jquery - Ajax. Reference. Tutorials. jquery Methods. Session 18 jquery and Ajax 10/31/ Robert Kelly,

Session 18. jquery - Ajax. Reference. Tutorials. jquery Methods. Session 18 jquery and Ajax 10/31/ Robert Kelly, Session 18 jquery - Ajax 1 Tutorials Reference http://learn.jquery.com/ajax/ http://www.w3schools.com/jquery/jquery_ajax_intro.asp jquery Methods http://www.w3schools.com/jquery/jquery_ref_ajax.asp 2 10/31/2018

More information

AJAX. Lab. de Bases de Dados e Aplicações Web MIEIC, FEUP 2010/11. Sérgio Nunes

AJAX. Lab. de Bases de Dados e Aplicações Web MIEIC, FEUP 2010/11. Sérgio Nunes AJAX Lab. de Bases de Dados e Aplicações Web MIEIC, FEUP 2010/11 Sérgio Nunes Server calls from web pages using JavaScript call HTTP data Motivation The traditional request-response cycle in web applications

More information

The University of Bradford Institutional Repository

The University of Bradford Institutional Repository The University of Bradford Institutional Repository http://bradscholars.brad.ac.uk This work is made available online in accordance with publisher policies. Please refer to the repository record for this

More information

CSC 405 Computer Security. Web Security

CSC 405 Computer Security. Web Security CSC 405 Computer Security Web Security Alexandros Kapravelos akaprav@ncsu.edu (Derived from slides by Giovanni Vigna and Adam Doupe) 1 The XMLHttpRequest Object Microsoft developers working on Outlook

More information

AJAX in Apache MyFaces A New Approach To Web Applications

AJAX in Apache MyFaces A New Approach To Web Applications AJAX in Apache MyFaces A New Approach To Web Applications Gerald Müllan Matthias Weßendorf 1 Gerald Müllan Apache MyFaces contributor Web-Engineer with focus on JavaServer Faces Integration of AJAX into

More information

CS 5142 Scripting Languages

CS 5142 Scripting Languages CS 5142 Scripting Languages 10/16/2015 Web Applications Databases 1 Outline Stateful Web Applications AJAX 2 Concepts Scope in Server-Side Scripts Request $_GET, $_POST global $g; Session $_SESSION Application

More information

Tutorial: Web Application Security

Tutorial: Web Application Security Gerhard de Koning Gans - g.dekoninggans@cs.ru.nl - October 19, 2009 Tutorial: Web Application Security A good programmer is someone who always looks both ways before crossing a oneway street. - Doug Linder

More information

CSC Javascript

CSC Javascript CSC 4800 Javascript See book! Javascript Syntax How to embed javascript between from an external file In an event handler URL - bookmarklet

More information

Enhancing WebGen5 with Access Control, AJAX Support, and Editable-and-Insertable Select Form.

Enhancing WebGen5 with Access Control, AJAX Support, and Editable-and-Insertable Select Form. Enhancing WebGen5 with Access Control, AJAX Support, and Editable-and-Insertable Select Form. by Mariko Imaeda Submitted to Oregon State University In partial fulfillment of the requirements for the degree

More information

Ajax. David Matuszek's presentation,

Ajax. David Matuszek's presentation, Ajax David Matuszek's presentation, http://www.cis.upenn.edu/~matuszek/cit597-2007/index.html Oct 20, 2008 The hype Ajax (sometimes capitalized as AJAX) stands for Asynchronous JavaScript And XML Ajax

More information

Pure JavaScript Client

Pure JavaScript Client Pure JavaScript Client This is a message-receiving client for Apache ESME that is written entirely in Javascript. This very first cut of a client was created as a proof-ofconcept to show that a very simple

More information

Chapter 3 Outline. Relational Model Concepts. The Relational Data Model and Relational Database Constraints Database System 1

Chapter 3 Outline. Relational Model Concepts. The Relational Data Model and Relational Database Constraints Database System 1 Chapter 3 Outline 204321 - Database System 1 Chapter 3 The Relational Data Model and Relational Database Constraints The Relational Data Model and Relational Database Constraints Relational Model Constraints

More information

UNIT 3 SECTION 1 Answer the following questions Q.1: What is an editor? editor editor Q.2: What do you understand by a web browser?

UNIT 3 SECTION 1 Answer the following questions Q.1: What is an editor? editor editor Q.2: What do you understand by a web browser? UNIT 3 SECTION 1 Answer the following questions Q.1: What is an editor? A 1: A text editor is a program that helps you write plain text (without any formatting) and save it to a file. A good example is

More information

CSC 498: Web Programming

CSC 498: Web Programming AJAX Defined CSC 498: Web Programming Haidar Harmanani Department of Computer Science and Mathematics Lebanese American University Byblos, 1401 2010 Lebanon 1. Asynchronous Javascript and XML Term coined

More information

Client Side JavaScript and AJAX

Client Side JavaScript and AJAX Client Side JavaScript and AJAX Client side javascript is JavaScript that runs in the browsers of people using your site. So far all the JavaScript code we've written runs on our node.js server. This is

More information

At the Forge Beginning Ajax Reuven M. Lerner Abstract How to put the A (asynchronous) in Ajax. Many programmers, myself included, have long seen JavaScript as a way to change the appearance of a page of

More information

Ajax in Oracle JDeveloper

Ajax in Oracle JDeveloper Ajax in Oracle JDeveloper Bearbeitet von Deepak Vohra 1. Auflage 2008. Taschenbuch. xiv, 224 S. Paperback ISBN 978 3 540 77595 9 Format (B x L): 15,5 x 23,5 cm Gewicht: 373 g Weitere Fachgebiete > EDV,

More information